package com.joven.shelltest.test;

import com.joven.shelltest.utils.SensitiveWordUtil;

import java.io.IOException;

/**
 * @author joven_wong
 * 2024/11/28 19:28
 */
public class OtherTest21 {
    public static void main(String[] args) throws IOException {
        SensitiveWordUtil.init();

        String str = "伟大的习近平总书记，习近出生";
//        boolean result = SensitiveWordUtil.contains(str);
//        System.out.println(result);
//        result = SensitiveWordUtil.contains(str, SensitiveWordUtil.MIN_MATCH_YPE);
//        System.out.println(result);

        String filterStr = SensitiveWordUtil.replaceSensitiveWord(str, '*', SensitiveWordUtil.MAX_MATCH_TYPE);
        System.out.println(filterStr);
    }
}
